#!/bin/sh

ip=192.168.100.3

while true
do
        ping -c 2 $ip >/dev/null 2>&1
        if [ $? -ne 0 ];then
            /etc/init.d/ipvsd start &> /dev/null
        else
            /etc/init.d/ipvsd stop &> /dev/null
        fi
        sleep 2
done
